<?php

namespace App\Console\Commands;

use App\Http\Logic\TickersLogic;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;

class CacheMarketTickers extends Command
{
    protected $signature = 'market_tickers:cache';

    protected $description = '获取最新数据存入缓存';

    public function handle()
    {
        $list = TickersLogic::cacheMarketTickers('SPOT');

        if(false === $list) {
            Log::channel('daily')->error(TickersLogic::getErrorMessage());
        }
    }

}
